package com.weekdo.moviecomic;

import java.io.File;
import java.util.ArrayList;

import android.app.Activity;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.database.DataSetObserver;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.Display;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Adapter;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.BaseAdapter;
import android.widget.Gallery;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.RelativeLayout.LayoutParams;
import android.widget.Toast;
import android.widget.ViewSwitcher.ViewFactory;

public class ComicView extends Activity implements OnItemSelectedListener {

	private String comicEntry = "";
	//private ArrayList<String> mFramePaths; // = {R.drawable.frame242, R.drawable.frame245, R.drawable.frame248, R.drawable.frame251, R.drawable.frame253, R.drawable.frame256, R.drawable.frame258, R.drawable.frame262, R.drawable.frame266, R.drawable.frame269, R.drawable.frame272, R.drawable.frame275, R.drawable.frame302, R.drawable.frame395, R.drawable.frame397, R.drawable.frame400, R.drawable.frame404, R.drawable.frame407, R.drawable.frame410, R.drawable.frame413, R.drawable.frame420, R.drawable.frame423, R.drawable.frame425, R.drawable.frame429, R.drawable.frame435, R.drawable.frame437, R.drawable.frame440, R.drawable.frame601, R.drawable.frame604, R.drawable.frame622, R.drawable.frame627, R.drawable.frame628, R.drawable.frame635, R.drawable.frame639, R.drawable.frame642, R.drawable.frame647, R.drawable.frame650, R.drawable.frame653, R.drawable.frame657, R.drawable.frame790, R.drawable.frame866, R.drawable.frame867, R.drawable.frame874, R.drawable.frame888, R.drawable.frame894, R.drawable.frame910, R.drawable.frame928, R.drawable.frame943, R.drawable.frame947, R.drawable.frame950, R.drawable.frame953, R.drawable.frame955, R.drawable.frame959, R.drawable.frame963, R.drawable.frame965, R.drawable.frame970, R.drawable.frame974, R.drawable.frame977, R.drawable.frame995, R.drawable.frame998, R.drawable.frame999, R.drawable.frame1003, R.drawable.frame1006, R.drawable.frame1011, R.drawable.frame1081, R.drawable.frame1084, R.drawable.frame1090, R.drawable.frame1093, R.drawable.frame1096, R.drawable.frame1099, R.drawable.frame1102, R.drawable.frame1106, R.drawable.frame1108, R.drawable.frame1111, R.drawable.frame1112, R.drawable.frame1128, R.drawable.frame1131, R.drawable.frame1134, R.drawable.frame1138, R.drawable.frame1143, R.drawable.frame1145, R.drawable.frame1149, R.drawable.frame1301, R.drawable.frame1303, R.drawable.frame1305, R.drawable.frame1309, R.drawable.frame1346, R.drawable.frame1348, R.drawable.frame1350, R.drawable.frame1352, R.drawable.frame1355, R.drawable.frame1357, R.drawable.frame1362, R.drawable.frame1364, R.drawable.frame1367, R.drawable.frame1369, R.drawable.frame1372, R.drawable.frame1375, R.drawable.frame1382, R.drawable.frame1389, R.drawable.frame1394, R.drawable.frame1399, R.drawable.frame1403, R.drawable.frame1406, R.drawable.frame1411, R.drawable.frame1418, R.drawable.frame1424, R.drawable.frame1428, R.drawable.frame1431, R.drawable.frame1540, R.drawable.frame1542, R.drawable.frame1547, R.drawable.frame1550, R.drawable.frame1553, R.drawable.frame1559, R.drawable.frame1565, R.drawable.frame1568, R.drawable.frame1570, R.drawable.frame1575, R.drawable.frame1577, R.drawable.frame1581, R.drawable.frame1585, R.drawable.frame1594, R.drawable.frame1598, R.drawable.frame1625, R.drawable.frame1628, R.drawable.frame1631, R.drawable.frame1634, R.drawable.frame1637, R.drawable.frame1644, R.drawable.frame1650, R.drawable.frame1653, R.drawable.frame1658, R.drawable.frame1675, R.drawable.frame1678, R.drawable.frame1681, R.drawable.frame1684, R.drawable.frame1687, R.drawable.frame1692, R.drawable.frame1696, R.drawable.frame1699, R.drawable.frame1703, R.drawable.frame1706, R.drawable.frame1707, R.drawable.frame1711, R.drawable.frame1714, R.drawable.frame1719, R.drawable.frame1722, R.drawable.frame1758, R.drawable.frame1765, R.drawable.frame1767, R.drawable.frame1770, R.drawable.frame1773, R.drawable.frame1776, R.drawable.frame1779, R.drawable.frame1797, R.drawable.frame1799, R.drawable.frame1800, R.drawable.frame1812, R.drawable.frame1828, R.drawable.frame1832, R.drawable.frame1833, R.drawable.frame1836, R.drawable.frame1872, R.drawable.frame1880, R.drawable.frame1883, R.drawable.frame1885, R.drawable.frame1889, R.drawable.frame1896, R.drawable.frame1903, R.drawable.frame1905, R.drawable.frame1907, R.drawable.frame1911, R.drawable.frame1915, R.drawable.frame1917, R.drawable.frame1929, R.drawable.frame1933, R.drawable.frame1945, R.drawable.frame1957, R.drawable.frame1962, R.drawable.frame1968, R.drawable.frame2007, R.drawable.frame2018, R.drawable.frame2028, R.drawable.frame2040, R.drawable.frame2048, R.drawable.frame2050, R.drawable.frame2053, R.drawable.frame2054, R.drawable.frame2062, R.drawable.frame2065, R.drawable.frame2067, R.drawable.frame2070, R.drawable.frame2072, R.drawable.frame2075, R.drawable.frame2077, R.drawable.frame2078, R.drawable.frame2081, R.drawable.frame2084, R.drawable.frame2088, R.drawable.frame2098, R.drawable.frame2101, R.drawable.frame2104, R.drawable.frame2106, R.drawable.frame2108, R.drawable.frame2117, R.drawable.frame2119, R.drawable.frame2123, R.drawable.frame2126, R.drawable.frame2130, R.drawable.frame2132, R.drawable.frame2134, R.drawable.frame2136, R.drawable.frame2141, R.drawable.frame2150, R.drawable.frame2154, R.drawable.frame2156, R.drawable.frame2158, R.drawable.frame2160, R.drawable.frame2163, R.drawable.frame2165, R.drawable.frame2169, R.drawable.frame2171, R.drawable.frame2175, R.drawable.frame2178, R.drawable.frame2179, R.drawable.frame2181, R.drawable.frame2183, R.drawable.frame2187, R.drawable.frame2190, R.drawable.frame2191, R.drawable.frame2198, R.drawable.frame2201, R.drawable.frame2205, R.drawable.frame2207, R.drawable.frame2210, R.drawable.frame2214, R.drawable.frame2217, R.drawable.frame2219, R.drawable.frame2222, R.drawable.frame2227, R.drawable.frame2228, R.drawable.frame2231, R.drawable.frame2233, R.drawable.frame2236, R.drawable.frame2239, R.drawable.frame2241, R.drawable.frame2252, R.drawable.frame2255, R.drawable.frame2257, R.drawable.frame2258, R.drawable.frame2261, R.drawable.frame2270, R.drawable.frame2273, R.drawable.frame2277, R.drawable.frame2284, R.drawable.frame2287, R.drawable.frame2370, R.drawable.frame2372, R.drawable.frame2382, R.drawable.frame2386, R.drawable.frame2389, R.drawable.frame2392, R.drawable.frame2395, R.drawable.frame2398, R.drawable.frame2401, R.drawable.frame2406, R.drawable.frame2410, R.drawable.frame2412, R.drawable.frame2415, R.drawable.frame2421, R.drawable.frame2437, R.drawable.frame2439, R.drawable.frame2441, R.drawable.frame2444, R.drawable.frame2446, R.drawable.frame2449, R.drawable.frame2453, R.drawable.frame2460, R.drawable.frame2462, R.drawable.frame2464, R.drawable.frame2470, R.drawable.frame2473, R.drawable.frame2478, R.drawable.frame2484, R.drawable.frame2488, R.drawable.frame2491, R.drawable.frame2495, R.drawable.frame2499, R.drawable.frame2501, R.drawable.frame2503, R.drawable.frame2507, R.drawable.frame2510, R.drawable.frame2517, R.drawable.frame2519, R.drawable.frame2520, R.drawable.frame2523, R.drawable.frame2527, R.drawable.frame2530, R.drawable.frame2534, R.drawable.frame2573, R.drawable.frame2579, R.drawable.frame2582, R.drawable.frame2585, R.drawable.frame2589, R.drawable.frame2592, R.drawable.frame2595, R.drawable.frame2599, R.drawable.frame2601, R.drawable.frame2604, R.drawable.frame2611, R.drawable.frame2614, R.drawable.frame2618, R.drawable.frame2621, R.drawable.frame2625, R.drawable.frame2629, R.drawable.frame2632, R.drawable.frame2635, R.drawable.frame2639, R.drawable.frame2642, R.drawable.frame2644, R.drawable.frame2647, R.drawable.frame2652, R.drawable.frame2655, R.drawable.frame2657, R.drawable.frame2659, R.drawable.frame2663, R.drawable.frame2665, R.drawable.frame2667, R.drawable.frame2675, R.drawable.frame2679, R.drawable.frame2683, R.drawable.frame2687, R.drawable.frame2690, R.drawable.frame2692, R.drawable.frame2694, R.drawable.frame2697, R.drawable.frame2700, R.drawable.frame2711, R.drawable.frame2714, R.drawable.frame2719, R.drawable.frame2721, R.drawable.frame2723, R.drawable.frame2725, R.drawable.frame2728, R.drawable.frame2740, R.drawable.frame2744, R.drawable.frame2748, R.drawable.frame2750, R.drawable.frame2753, R.drawable.frame2755, R.drawable.frame2760, R.drawable.frame2867, R.drawable.frame2870, R.drawable.frame2876, R.drawable.frame2879, R.drawable.frame2883, R.drawable.frame2886, R.drawable.frame2887, R.drawable.frame2904, R.drawable.frame2907, R.drawable.frame2962, R.drawable.frame2965, R.drawable.frame2969, R.drawable.frame3002, R.drawable.frame3005, R.drawable.frame3007, R.drawable.frame3010, R.drawable.frame3013, R.drawable.frame3016, R.drawable.frame3018, R.drawable.frame3022, R.drawable.frame3024, R.drawable.frame3026, R.drawable.frame3029, R.drawable.frame3030, R.drawable.frame3032, R.drawable.frame3035, R.drawable.frame3038, R.drawable.frame3041, R.drawable.frame3044, R.drawable.frame3048, R.drawable.frame3050, R.drawable.frame3053, R.drawable.frame3057, R.drawable.frame3060, R.drawable.frame3061, R.drawable.frame3064, R.drawable.frame3068, R.drawable.frame3083, R.drawable.frame3100, R.drawable.frame3106, R.drawable.frame3111, R.drawable.frame3118, R.drawable.frame3123, R.drawable.frame3127, R.drawable.frame3130, R.drawable.frame3134, R.drawable.frame3141, R.drawable.frame3144, R.drawable.frame3149, R.drawable.frame3153, R.drawable.frame3168, R.drawable.frame3171, R.drawable.frame3175, R.drawable.frame3178, R.drawable.frame3181, R.drawable.frame3184, R.drawable.frame3186, R.drawable.frame3188, R.drawable.frame3191, R.drawable.frame3194, R.drawable.frame3197, R.drawable.frame3200, R.drawable.frame3203, R.drawable.frame3205, R.drawable.frame3212, R.drawable.frame3217, R.drawable.frame3226, R.drawable.frame3228, R.drawable.frame3232, R.drawable.frame3235, R.drawable.frame3238, R.drawable.frame3241, R.drawable.frame3244, R.drawable.frame3247, R.drawable.frame3256, R.drawable.frame3261, R.drawable.frame3269, R.drawable.frame3271, R.drawable.frame3276, R.drawable.frame3285, R.drawable.frame3434, R.drawable.frame3454, R.drawable.frame3481, R.drawable.frame3497, R.drawable.frame3517, R.drawable.frame3520, R.drawable.frame3528, R.drawable.frame3530, R.drawable.frame3534, R.drawable.frame3537, R.drawable.frame3539, R.drawable.frame3542, R.drawable.frame3544, R.drawable.frame3552, R.drawable.frame3563, R.drawable.frame3565, R.drawable.frame3593, R.drawable.frame3600, R.drawable.frame3602, R.drawable.frame3605, R.drawable.frame3607, R.drawable.frame3610, R.drawable.frame3612, R.drawable.frame3615, R.drawable.frame3622, R.drawable.frame3631, R.drawable.frame3634, R.drawable.frame3641, R.drawable.frame3644, R.drawable.frame3647, R.drawable.frame3648, R.drawable.frame3662, R.drawable.frame3685, R.drawable.frame3702, R.drawable.frame3706, R.drawable.frame3710, R.drawable.frame3713, R.drawable.frame3719, R.drawable.frame3745, R.drawable.frame3807, R.drawable.frame3860, R.drawable.frame3866, R.drawable.frame3869, R.drawable.frame3870, R.drawable.frame3872, R.drawable.frame3874, R.drawable.frame3876, R.drawable.frame3882, R.drawable.frame3888, R.drawable.frame3892, R.drawable.frame3895, R.drawable.frame4146, R.drawable.frame4150, R.drawable.frame4153, R.drawable.frame4165, R.drawable.frame4169, R.drawable.frame4187, R.drawable.frame4197, R.drawable.frame4202, R.drawable.frame4206, R.drawable.frame4212, R.drawable.frame4216, R.drawable.frame4308, R.drawable.frame4330, R.drawable.frame4334, R.drawable.frame4354, R.drawable.frame4357, R.drawable.frame4360, R.drawable.frame4365, R.drawable.frame4369, R.drawable.frame4374, R.drawable.frame4377, R.drawable.frame4380, R.drawable.frame4383, R.drawable.frame4386, R.drawable.frame4396, R.drawable.frame4416, R.drawable.frame4420, R.drawable.frame4439, R.drawable.frame4441, R.drawable.frame4443, R.drawable.frame4445, R.drawable.frame4447, R.drawable.frame4484, R.drawable.frame4490, R.drawable.frame4499, R.drawable.frame4503, R.drawable.frame4512, R.drawable.frame4516, R.drawable.frame4519, R.drawable.frame4522, R.drawable.frame4545, R.drawable.frame4547, R.drawable.frame4552, R.drawable.frame4554, R.drawable.frame4557, R.drawable.frame4558, R.drawable.frame4559, R.drawable.frame4562, R.drawable.frame4564, R.drawable.frame4727, R.drawable.frame4730, R.drawable.frame4733, R.drawable.frame4736, R.drawable.frame4741, R.drawable.frame4745, R.drawable.frame4747, R.drawable.frame4752, R.drawable.frame4755, R.drawable.frame4759, R.drawable.frame4764, R.drawable.frame4772, R.drawable.frame4777, R.drawable.frame4782, R.drawable.frame4785, R.drawable.frame4787, R.drawable.frame4789, R.drawable.frame4797, R.drawable.frame4800, R.drawable.frame4804, R.drawable.frame4807, R.drawable.frame4810, R.drawable.frame4814, R.drawable.frame4817, R.drawable.frame4820, R.drawable.frame4824, R.drawable.frame4828, R.drawable.frame4834, R.drawable.frame4837, R.drawable.frame4839, R.drawable.frame4842, R.drawable.frame4844, R.drawable.frame4886, R.drawable.frame4892, R.drawable.frame4898, R.drawable.frame4905, R.drawable.frame4984, R.drawable.frame4985, R.drawable.frame5040, R.drawable.frame5049, R.drawable.frame5103, R.drawable.frame5126, R.drawable.frame5131, R.drawable.frame5135, R.drawable.frame5138, R.drawable.frame5144, R.drawable.frame5154, R.drawable.frame5157, R.drawable.frame5168, R.drawable.frame5173, R.drawable.frame5174, R.drawable.frame5196, R.drawable.frame5237, R.drawable.frame5240, R.drawable.frame5262, R.drawable.frame5265, R.drawable.frame5279, R.drawable.frame5283, R.drawable.frame5289, R.drawable.frame5297, R.drawable.frame5303, R.drawable.frame5308, R.drawable.frame5312, R.drawable.frame5315, R.drawable.frame5318, R.drawable.frame5322, R.drawable.frame5324, R.drawable.frame5326, R.drawable.frame5328, R.drawable.frame5330, R.drawable.frame5357, R.drawable.frame5434, R.drawable.frame5437, R.drawable.frame5440, R.drawable.frame5442, R.drawable.frame5445, R.drawable.frame5449, R.drawable.frame5452, R.drawable.frame5456, R.drawable.frame5461, R.drawable.frame5464};
	private ArrayList<ArrayList<String>> mLines; // = {"[1] My name is Alice.", "[2] I worked for the Umbrella Corporation, in a secret laboratory", "[3] developing eperimental bio weponary", "[4] There was an incident, a virus escaped.", "[5] Everybody died.", "[6] trouble was...", "[7] There didn't stay dead.", "[8] This was the start of an apocalypse that whould sweep the entire world", "[9] The men responsible for this disaster took refuge underground", "[10] And continued to experiment with the deadly T-Virus.", "[11] They felt secure in their high tech fortress.", "[12] But they were wrong.", "[13] Bio hazard. (Speaking Japanese...)", "[14] Mr General?", "[15] - Report. - Sir.", "[16] A half hour ago we began lose contact with parameter sentries.", "[17] How many have we lost?", "[18] - All of them. - And you waited 30 minutes to tell me?", "[19] We thought it was a communications problem. I didn't want to disturb you.", "[20] Give me the surface gate. Hai!", "[21] - This is General Wesker. - Sir.", "[22] - Report your situation. - Everything is quiet here.", "[23] No sign of intruders?", "[24] Hotaka...we have movement! Multiples targets", "[25] Surface gate, Identify targets.", "[26] repeat...identify targets.", "[27] - Sir, elevator 2 is moving. - I want security at that main entrance now!", "[28] Hey, boys...", "[29] Is that any way to treat a lady?", "[30] Tell security to flood the main entrance with Nano-Gas.", "[31] Sir...?", "[32] Our men are still out there!", "[33] Any more questions?", "[34] Intruders in sectors 1 thru 5 7 and 8.", "[35] Reports of gun fire in sectors 10 and 11.", "[36] Stay at your stations!", "[37] All security protocols are now in full effect.", "[38] Lock down all elevators Seal all internal blast doors", "[39] And I want damage reports.", "[40] Intruder Alert", "[41] Purge Facility. Authorization.", "[42] Countdown Started.", "[43] - Run. Move! Go! Go! Go! - Out! Everybody move out!", "[44] (Computer Voice) Turbulence. Turbulence. Turbulence.", "[45] (Computer Voice) Turbulence. Turbulence.", "[46] (Computer Voice) Turbulence. Turb...", "[47] Any last words?", "[48] How nice to finally meet the real you.", "[49] Hurts...doesn't it?", "[50] Well, it's just the start of the bad news.", "[51] All those powers of your's...", "[52] Speed ...Strength...", "[53] Accelerated healing... Well, you can kiss all those goodbye.", "[54] - What have you done? - The Serum I've injected you with", "[55] is neutralizing the T-cells with in your body.", "[56] Put simply...The Umbrella Corporation is taking back it's property.", "[57] You just didn't work out.", "[58] So, you are being withdrawn", "[59] I am what you used to be... Only better.", "[60] Please wait.", "[61] Last words?", "[62] - Thank you. - For killing you?", "[63] For making me human again.", "[64] (Computer Voice) Pull up...Terrian...Terrian... Pull up...Terrian...Terrian...", "[65] This is Arcadia, broadcasting on the emergency frequency.", "[66] There is no infection. We offer safety and security...food and shelter.", "[67] This is Arcadia, broadcasting on the emergency frequency.", "[68] There is no infection...", "[69] Well I took revenge on Umbrella,", "[70] The last handful of survivors took a chopper to safety.", "[71] They were Headed for a town in Alaska called Arcadia.", "[72] We had received radio transmissions from there", "[73] They offered food and shelter, safety and security ...", "[74] A Haven.", "[75] Free of infection.", "[76] May 3, 16:00 hours", "[77] 177 days without signs of life.", "[78] I'm at, uh...", "[79] 58.37 degrees North, 134.58 degrees West.", "[80] Closing on coordinates for Arcadia", "[81] But no signs appear on any map.", "[82] I hope Claire & the others made it.", "[83] You're not coming?", "[84] Take care of the others.", "[85] Good luck, K-Mart.", "[86] Claire...", "[87] May 3", "[88] 19:30 hours", "[89] Arcadia.", "[90] If such a place exists.", "[91] Just an empty field...", "[92] And a beach.", "[93] We all heard the transmissions.", "[94] Someone must've sent them.", "[95] Someone must have...", "[96] Why aren't all these people here?", "[97] Or why...", "[98] Where they go?", "[99] Day 177 signing off.", "[100] I don't know if I can do this much longer.", "[101] I am the last one...or is there no one else?", "[102] Anyone who watches this tape...", "[103] Is this my punishment?", "[104] To know that all this happened?", "[105] Hey! Wait!", "[106] Wait! Please! Stop!", "[107] Hello?", "[108] Hello...?", "[109] Answer me!", "[110] Hey. Hey!", "[111] It's okay.", "[112] Sorry about that.", "[113] But I had to get this thing off for you. What is this?", "[114] Who did this to you?", "[115] Do you know who I am?", "[116] My name is Alice.", "[117] We met in the Nevada desert 18 months ago.", "[118] Any of this sound familiar?", "[119] Mikey, Carlos, L.J. ...", "[120] K-Mart.", "[121] You left in a helicopter with a group of survivors headed for Alaska.", "[122] Arcadia, remember?", "[123] Arcadia, remember?", "[124] Arcadia, remember?", "[125] May 4...08:00 hours", "[126] Plotted a course to Prince Rupert and British Columbia.", "[127] I'll pass Vancouver, Drop down in Seattle", "[128] After that its San Francisco...", "[129] And the rest of the West Coast.", "[130] My passengers is still talkative as ever.", "[131] Whatever that thing was it was injecting her with some sort of drug.", "[132] Something that causes memory loss.", "[133] I just hope the effects aren't permanent.", "[134] Your name...?", "[135] Is Alice right...?", "[136] You shouldn't speak.", "[137] Look, I'm sorry about back there.", "[138] I don't...I don't know what happened.", "[139] I don't remember anything.", "[140] I don't even know my name.", "[141] It's Claire.", "[142] Claire Redfield.", "[143] Claire.", "[144] Sound familiar?", "[145] Not really.", "[146] You'll get used to it.", "[147] Perhaps you can cut me loose now.", "[148] We should get know each other a little better first.", "[149] City of Angels ...", "[150] May 6th at 18:00 hours", "[151] Los Angeles.", "[152] No signs of life.", "[153] Not even the undead.", "[154] Someone must have cleaned up the city.", "[155] But what about the rest?", "[156] Oh! My God.", "[157] What?", "[158] Look over there.", "[159] Damn.", "[160] It's a plane. It's a plane!", "[161] I knew it!", "[162] Help Us.", "[163] - I told you they will come. - Hey! We're down here! Hello!", "[164] No way we're gettin' in there.", "[165] Where is going? Why is it flying away?", "[166] It's not flying away.", "[167] - circling... - \"circling\"", "[168] Damn, he's low.", "[169] What the hell is he doin'?", "[170] - he's gonna land. - he's gonna land!", "[171] Get over there...out of the away! Quick! Go!", "[172] - Land? - Yeah...land!", "[173] That is one crazy son of a bitch.", "[174] It's a pleasure to make your acquaintance.", "[175] Then cut me loose.", "[176] - Thanks. - Just don't try anything crazy, alright?", "[177] Nothing as crazy as what you have in mind.", "[178] - Come on! Keep moving! - I'm trying.", "[179] All right, hold on.", "[180] Hey, help me!", "[181] Come on.", "[182] No!", "[183] - Hold him! - Grab it!", "[184] -That's it -Good job.", "[185] - Nice landing. - I think technically is called crashing.", "[186] - Luther West. - Alice.", "[187] And this is Claire.", "[188] Luther West.", "[189] It is a pleasure to meet you.", "[190] - Hi! My name is Crystal. - No, no, no!", "[191] Enough with the introductions. So you're here to help, right?", "[192] - can you get us out? - are you from Arcadia?", "[193] - What did you say? - are you from Arcadia?", "[194] - What do you know about Arcadia? - They said that they can help us!", "[195] There are other survivors, civilization and safety.", "[196] Infection free.", "[197] So they sent you, right?", "[198] - No. - But there are others out there?", "[199] - Like you? - It's just us.", "[200] - There'll be no rescue? - I'm sorry...Oh...", "[201] - Sorry. - Don't even think about it...they had their hopes up", "[202] Thery thought you could take them to the promise lands.", "[203] Angel Ortiz.", "[204] That was some fine flying!", "[205] Thanks.", "[206] What's the prognosis?", "[207] - She'll live. - Yeah.", "[208] You know...I have the strangest feeling...", "[209] I know you.", "[210] Yeah...I get that lot.", "[211] You a sports fan, huh?", "[212] You like basketball?", "[213] - Not really. - No? Oh.", "[214] Then maybe just a fan of... A fine timepiece.", "[215] Yeah. Luther here is our resident superstar.", "[216] So, tell me about Arcadia?", "[217] What exactly do you know?", "[218] Just what we heard from their transmissions.", "[219] We've been recieving that broadcast for a week.", "[220] Food and shelter, safety and security ...", "[221] - No infection. - We thought they sent you.", "[222] We launched flares for days to get their attention.", "[223] Flares?", "[224] Who gonna see flares from Alaska?", "[225] - Alaska? - Alaska?", "[226] Arcadia...I've been there.", "[227] It's in Alaska.", "[228] - It's a town or so we thought. - A town?", "[229] I don't think so.", "[230] Take a look.", "[231] At what?", "[232] You see?", "[233] It's not a town.", "[234] It's a ship.", "[235] I recorded this from the short-wave.", "[236] This is Arcadia...broadcasting on the emergency frequency.", "[237] There is no infection. We offer safety and security, food and shelter.", "[238] It's..It's the same message we've heard.", "[239] They must have been sailing up and down the coast picking up survivors.", "[240] This is Arcadia...broadcasting on the emergency frequency.", "[241] What is that?", "[242] I don't know.", "[243] That was the we heard from them.", "[244] Then it just stopped.", "[245] That was two days ago.", "[246] We've been sending up flares on the hour.", "[247] And when you have arrived, of couse, we thought they had sent you.", "[248] Claire.", "[249] That ship over there...", "[250] That's Arcadia.", "[251] I know.", "[252] - You remember? - I remember the beach.", "[253] People were coming to help us.", "[254] What happened? Why didn't you go with others?", "[255] I don't know. I can't remember.", "[256] We have to get to that ship.", "[257] We have to get to that ship.", "[258] Welcome to your new home.", "[259] Cell Block B", "[260] Crystal's our cook. The menus are not extensive, but she's master what she does.", "[261] Sorry I didn't bring better news.", "[262] Get used to disappointment, right? That my agent used to say.", "[263] Were you an actress?", "[264] Came to Hollywood to live the dream and ended up waiting tables.", "[265] Why are we waiting? Excuse me I'm hungry. Thank you.", "[266] - Get out of here. - Thank you.", "[267] I had plenty of creeps right here in my time.", "[268] What's his story?", "[269] Back in the world, he was kind of a big movie producer.", "[270] The boy's got stick to his ass!", "[271] Kim Young used to intern for him But he still hasn't figured out the world has changed.", "[272] That plane of yours...", "[273] You think it can still fly?", "[274] It can fly...but it only takes two.", "[275] So you could take us to Arcadia one at a time.", "[276] Look, I think she was lucky to land here once.", "[277] Five or six times would be suicide.", "[278] - No offense. - None taken.", "[279] There has to be another way out.", "[280] We have to get to that ship.", "[281] Well... There is the...   (Clears throat)", "[282] - What? - Nothing.", "[283] Look, it would be a waste of your time.", "[284] I have time to waste.", "[285] When shit hit the fan, We took refuge in the prison.", "[286] Seemed like the biggest, strongest walls...", "[287] Best chance of keeping those thing out.", "[288] By the time we got here, the guards and inmates were already long gone.", "[289] I guess...", "[290] When peoples starting eating one other ...", "[291] Wasn't much fun keeping anyone locked up.", "[292] We thought the place was abandoned.", "[293] Until we made a discoverey.", "[294] Wendell...", "[295] It's time to take a break.", "[296] It's about god damn time.", "[297] I hate being down here. I hear movement...in the walls.", "[298] Well, let's check it out.", "[299] We'll be back in a minute.", "[300] Come on.", "[301] Name's Chris.", "[302] You're the one flying that plane.", "[303] How do you know that?", "[304] Wendell isn't only one who hears things.", "[305] I am glad you made it.", "[306] Maybe you can talk some sense into these people's.", "[307] What do you mean?", "[308] Isn't it obvious?", "[309] I'm not a prisoner.", "[310] I shouldn't be in here.", "[311] I was working with military unit.", "[312] We were using this place as a staging post.", "[313] Things were already pretty bad when the order came through from the Governor", "[314] to release all immates.", "[315] You see, we need as many people on the streets as possible to fight those things.", "[316] And it was chaos.", "[317] We were pulling out and a gang of prisoners jumped me.", "[318] Guess they thought I was guard.", "[319] When I woke up, my unit was gone ...", "[320] And I was in here.", "[321] Their idea of joke.", "[322] You don't believe me?", "[323] If the others ...", "[324] You need to get me out of here.", "[325] We're all trapped here one way or another.", "[326] That's true but I can help you.", "[327] -Seen enough? -You find anything?", "[328] No.", "[329] I know way out of this place.", "[330] You get me out of here I'll do the same for you", "[331] You'll gonna need me!", "[332] - Have you checked out what its taking about? - His way out?", "[333] He's not telling us shit until we let him out. And I'm not letting him out.", "[334] The man is a killer.", "[335] - Really? - I can see it in his eyes.", "[336] - How can you be so sure? - I know people.", "[337] Interesting. Tell me...", "[338] What you seen when you look in my eyes?", "[339] Whoa!Holy Shit.", "[340] Girl's gotta be prepared.", "[341] What could you possibly want with those?", "[342] It's a hobby.", "[343] A hobby?", "[344] All right.", "[345] Well, I'll see you in the morning.", "[346] No sign of anyone on deck.", "[347] Your friends are out there.", "[348] I think so.", "[349] You don't remember?", "[350] It's coming back.", "[351] Slowly...", "[352] Nothing makes any sense.", "[353] - We still have running water. - Very civilized", "[354] We do our best.", "[355] - It's cold. - Our best only goes so far.", "[356] - These are for you. - Thank you.", "[357] I guess I should leave you to it?", "[358] I guess you should.", "[359] - I'll be right outside. - Thank you.", "[360] Luther...?", "[361] Luther?", "[362] - Easy, baby. Move it!", "[363] Hey, I'll just be on my way now.", "[364] - Take it easy, take it easy, take it easy. - I didn't see you.", "[365] What is that smell?", "[366] Must've burrowed up from the sewers...", "[367] Wendell said he heard things moving behind the walls.", "[368] So...so...these can just burst out anywhere?", "[369] - We gotta get out of this place. - Arcadia will send help.", "[370] No one's coming to get us.", "[371] Okay? No one. We have to help ourselves.", "[372] - Now this plane that you have? - It can't hold all of us.", "[373] - We draw straws... - No!", "[374] We all get out of here And no one is left behind", "[375] Great.", "[376] How are we gunna do that?", "[377] Walk out of here...just single file?", "[378] Are you crazy?", "[379] - They didn't want him getting out. - That's right. He's dangerous.", "[380] Angel...what do you think?", "[381] I think we don't have much of a choice.", "[382] This is insane. Crystal, Crystal, Crystal? Look at me. What do you think?", "[383] I mean, not even you're that dumb", "[384] I guess I am. I agree with Angel.", "[385] If this guy knows a way out I want to hear it.", "[386] All right.", "[387] Seriously?", "[388] This...this is a mistake.", "[389] - This is a big mistake. - You'd better keep your eyes on him.", "[390] I was wondering how long it would take.", "[391] Boo!Ahh! Alright, let's get the hell out of here.", "[392] - Claire? - What?", "[393] Claire, it's me.", "[394] It's Chris.", "[395] - I don't know you. - Claire?", "[396] I'm your brother, remember?", "[397] What the hell has happened to you?", "[398] Hey. It's okay. Let him go.", "[399] Look, she suffered some sort of memory loss.", "[400] If you really are her brother... It will come back.", "[401] Alright, this is very touching... I mean, a family reunion...", "[402] But if we could just get a move on please? Before we are all eaten the fuck alive!", "[403] Behind those doors is a UPV: Urban Pacification Vehicle.", "[404] Prison kept it in case of a serious riot.", "[405] 16 wheeler, steel plated, water cannon, seats 20", "[406] Ten tons of fun.", "[407] Roll on out style, drive right over 'em.", "[408] The lock's jammed.", "[409] - Maybe we could cut through it. - When we hit the coast", "[410] We're going to have to trasfer to a boat or something.", "[411] - We gonna need some more fire power. - I got you covered.", "[412] When I was stationed here We used a room in the basement as an armory.", "[413] It's got every weapon you can dream of.", "[414] How do you know you're unit didn't take them with 'em when they pulled out?", "[415] Because...by the end... There were lot more guns", "[416] than people to use them.", "[417] You go get the guns! Luther!", "[418] Oh! My god!", "[419] What is this?", "[420] They had pumps to keep the water out of the foundations.", "[421] When electricity failed, some of the lower levels start filling up.", "[422] There are another two floors down there", "[423] How far down is the armory?", "[424] All the way.", "[425] Luther, come on!", "[426] Get back! Get back!", "[427] - Where do you think you're going? - I was swimming champ back in high school.", "[428] - Is that right? - Here.", "[429] So now you're gunna trust me with a gun?", "[430] Yeah. Why not?", "[431] Luther, just shoot That motherfucker.", "[432] What the fuck is that thing?", "[433] All right. Let's go.", "[434] Let's go!", "[435] Nice.", "[436] Damn.", "[437] There must be hundreds of them out there.", "[438] We can't go back that way.", "[439] - Oh shit! - What? What do you mean, \"Oh shit!\"?", "[440] What? What is this?", "[441] - What do you think it is? - Oh! Don't tell me that thing fits inside of there.", "[442] Can you put this back together?", "[443] Maybe, but it could take a week.", "[444] What do we do now?", "[445] I know.", "[446] Bennett...What have you done?", "[447] Luther, we gotta get out of here!", "[448] Come on!", "[449] Do you hear that?", "[450] - Come on, baby. Come on! - What are we doing?", "[451] - We getting outta here! - But the others...", "[452] Fuck the others! Now get on board.", "[453] Bennett! What are you doing?", "[454] - Hey! - Kim Yong! Don't do this.", "[455] Open this door!", "[456] Please! Please!", "[457] Bennett!", "[458] Shit!", "[459] Thats right, bitch! Fuck you!", "[460] Yes! Yes!", "[461] - Fuckin' bitch... - I'm sorry.", "[462] I'm so sorry.", "[463] He's heading for the Arcadia.", "[464] Alice!", "[465] Come on!", "[466] Hit the cell block!", "[467] - Move! - I'll meet you there!", "[468] This thing has no power!", "[469] We won't need power!", "[470] Oh shit!", "[471] Hey, head for the shower block. Go!", "[472] Over Here!", "[473] - You alright? - I'm fine. Thanks.", "[474] This is a joke, right?", "[475] - No. - Tunnels leads to the sewers, sewers lead to", "[476] the storm drains...", "[477] Storm drains leads to sea.", "[478] It's our only chance.", "[479] I'll take point. I got your back.", "[480] Ladies...", "[481] Alright, you next.", "[482] - I can't do it. - You can.", "[483] Let's go!", "[484] Shhh...Those things are close.", "[485] We found a way out Just out there", "[486] The tunnel drop into a storm drain. Go.", "[487] Where's Kim Yong?", "[488] Go. Go!", "[489] Knew you'd make it.", "[490] Luther!", "[491] Go!", "[492] Luther!", "[493] We can't help him now.", "[494] We have to move on.", "[495] No welcome party, huh?", "[496] Looks like Bennett made it.", "[497] Let's check inside.", "[498] - Find anyone? - Nothing.", "[499] I checked the crew quarters... They're all gone.", "[500] Looks like they left in hurry.", "[501] This is Arcadia, broadcasting on the emergency frequency.", "[502] There is no infection. We offer safety and security, food and shelter.", "[503] Fuel...power...Everything's Running normally.", "[504] Look at this. It's the ships log.", "[505] Crew launched the life boats three days ago.", "[506] Exactly when the transmission stopped.", "[507] But it says ther's still 2,000 survivors on board.", "[508] We have to search every inch of the ship.", "[509] Umbrella...of course.", "[510] Never where coming for us.", "[511] This whole thing...", "[512] The beacon...", "[513] Was a lie.", "[514] And that's not the worst part.", "[515] It's a trap!", "[516] Where is everybody?", "[517] I don't understand.", "[518] I think I do.", "[519] They're underneath our feet.", "[520] They're holding survivors to experiment on them.", "[521] Look...", "[522] It's K-Mart...she's here.", "[523] Bring them up. All of them.", "[524] Here she is...K-mart", "[525] Get her out.", "[526] Baa.", "[527] K-Mart. It's okay. It's okay.", "[528] K-Mart, ok, it's all right.", "[529] I'll get that thing off her.", "[530] Go let everyone else out.", "[531] We your friends. and right now, I need your help.", "[532] Let me get this off of you.", "[533] Why am I not surprised?", "[534] You weren't too hard to find", "[535] Our satellite system is still operational.", "[536] And not as many people fly these days.", "[537] Besides, I always knew You'd be drawn to your friends.", "[538] Loyalty...", "[539] Highly overrated.", "[540] Stop!", "[541] Down!", "[542] Wouldn't want you Harming my pets", "[543] Drop your guns.", "[544] Good...kick them to me.", "[545] Your hands.", "[546] You don't look so good, Bennett.", "[547] Yeah, I am looking forward to Playing with your pretty face.", "[548] What do you want from me?", "[549] The T-virus brought me back.", "[550] But it's so strong.", "[551] It fights for full control.", "[552] And I thought that if I ingested fresh human DNA", "[553] I could redress the balance.", "[554] No wonder your crew abandoned ship.", "[555] No matter. Now I have a new subordinate.", "[556] And a new plan.", "[557] You were the only one who successfully bonded with the T-virus.", "[558] Your DNA is stronger than the others.", "[559] I ingest you... I gain control.", "[560] That's pretty smart thinking.", "[561] There is only one problem with that plan.", "[562] Stop. Right, right there.", "[563] And what is that?", "[564] I'm not on the menu.", "[565] Well, isn't this one big family reunion?", "[566] Chris & Claire Redfield...you've really become quite inconvenience for me.", "[567] I told you I'd be bringing a few friends.", "[568] You should've brought more.", "[569] Claire!", "[570] Claire!", "[571] Don't...even think about it.", "[572] Who the fuck are you?", "[573] I don't think so.", "[574] No! Don't do that! I'm a producer!", "[575] Open those doors!", "[576] You're deal with some serious consequences You motherfuckers.", "[577] Open the...", "[578] You're gonna live to regret this. All of ya!", "[579] Oh god.", "[580] I just wanna go home.", "[581] Hey. It's gonna be okay.", "[582] No!", "[583] Where is Alice!", "[584] Come on!", "[585] Yeah!", "[586] I really didn't want you to miss that.", "[587] Let's Rock!", "[588] Start somethin' bitches.", "[589] It's a miracle.", "[590] I never dreamed that was this many of them left alive.", "[591] So what next?", "[592] This is Arcadia, broadcasting on the emergency frequency.", "[593] I say...that we live up to the promise.", "[594] This is Arcadia, broadcasting on the emergency frequency.", "[595] Location: 118.30 degrees West.", "[596] 34.05 degrees North.", "[597] There is no infection. Repeat, there is no infection.", "[598] We offer safety, security,", "[599] food and shelter.", "[600] If you are out there", "[601] We will help you", "[602] There is hope.", "[603] - What is that? - Trouble.", "[604] Deployment T-minus 57 seconds,", "[605] when you hit the deck, you watch your formation.", "[606] Take no prisoners, shoot to kill .", "[607] Total enemy numbers are unknown,", "[608] but will include Umbrella fugitives and prime targets", "[609] Claire Redfield, Chris Redfield, and project Alice.", "[610] So Keep Up", "[611] Whatevers waiting for you out there just know one thing,", "[612] you are gonna be in the fight", "[613] of our lives"};
	
	private Gallery gallery;
	private TextView text;
	
	private Comic comic;
	private int comicWidth = 0;
	private int comicHeight = 0;
	
	private int viewWidth = 0;
	private int viewHeight = 0;
	
	private int GALLERY_ID = 1;
	static public float shadowPercent = 0.3f;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        Bundle data = this.getIntent().getExtras();
        if (data != null)
        {
        	this.comicEntry = data.getString("COMIC_ENTRY");
    		//Toast.makeText(this, this.comicEntry, 2000).show();
        	this.comic = new Comic(comicEntry);
        	mLines = comic.getLineList();
        	//mFramePaths = comic.getFramePathList();
        	
			String frameFileName="frame"+mLines.get(0).get(0)+".jpg";
			String cacheDir = FileManager.MCK_VIEW_CACHE_DIR+"/"+comicEntry;
			if (true == FileManager.unzipOneFileToCacheDir(frameFileName,
					FileManager.MCK_ARCHIVE_DIR+"/"+comicEntry+".zip",
					cacheDir));
			Bitmap image = BitmapFactory.decodeFile(cacheDir+"/"+frameFileName);
        	comicWidth = image.getWidth();
        	comicHeight = image.getHeight();

			Display display = getWindowManager().getDefaultDisplay();
			this.viewWidth = display.getWidth();
			this.viewHeight = display.getHeight();

        }

        requestWindowFeature(Window.FEATURE_NO_TITLE);
		this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
        
		if (mLines==null || mLines.size()==0) return;
		
		RelativeLayout layout = new RelativeLayout(this);
	
			gallery = new Gallery(this);
			gallery.setLayoutParams(new Gallery.LayoutParams(
					LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
			//gallery.setAnimationCacheEnabled(true);
			gallery.setSpacing(0);
			gallery.setAdapter(new ImageAdapter(this));
			gallery.setOnItemSelectedListener(this);
			gallery.setId(GALLERY_ID);
			layout.addView(gallery);
	
			
			RelativeLayout.LayoutParams lpText = new RelativeLayout.LayoutParams(
			        RelativeLayout.LayoutParams.WRAP_CONTENT,
			        RelativeLayout.LayoutParams.WRAP_CONTENT);
			//lpText.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, GALLERY_ID);
			int topOffset = (int) (this.comicHeight+(this.viewHeight-(1+shadowPercent)*this.comicHeight*this.comicWidth/this.viewWidth)/2);
			lpText.setMargins(10, topOffset, 10, 0);
			
			text = new TextView(this);
			text.setTextSize(20);
			text.setText("");
			text.setTextColor(0xffffffff);
			text.setLayoutParams(lpText);
			layout.addView(text);

		setContentView(layout);
    }

	public class ImageAdapter extends BaseAdapter {
		public ImageAdapter(Context context) {
			mContext = context;
		}

		public int getCount() {
			return mLines.size();
		}

		public Object getItem(int position) {
			return position;
		}

		public long getItemId(int position) {
			return position;
		}

		public View getView(int position, View convertView, ViewGroup parent) {
			ImageView i = new MirrorImageView(mContext, viewWidth, viewHeight,
					comicWidth, comicHeight);
			
			String frameFileName="frame"+mLines.get(position).get(0)+".jpg";
			String cacheDir = FileManager.MCK_VIEW_CACHE_DIR+"/"+comicEntry;
			if (true == FileManager.unzipOneFileToCacheDir(frameFileName,
					FileManager.MCK_ARCHIVE_DIR+"/"+comicEntry+".zip",
					cacheDir))
			{
				//ImageView i = new ImageView(mContext);
				//Uri imgUri=Uri.parse("file:///mnt/sdcard/MovieComicFiles/ViewCache/test1/frame3494.jpg");
				
				Uri imgUri=Uri.parse(cacheDir+"/"+frameFileName);
				if (imgUri != null)
				{
					i.setImageURI(imgUri);
					i.setAdjustViewBounds(true);
					i.setLayoutParams(new Gallery.LayoutParams(
							LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
					i.setScaleType(ImageView.ScaleType.FIT_START);
					//i.setBackgroundResource(R.drawable.picture_frame);
				}
			}
			
			return i;
		}

		private Context mContext;

	}

	@Override
	public void onItemSelected(AdapterView<?> arg0, View arg1, int position,
			long id) {
		//Log.d("-- CURRENT LINE --", this.mLines.get(position));
		this.text.setText(this.mLines.get(position).get(1));	
	}

	@Override
	public void onNothingSelected(AdapterView<?> arg0) {
		// TODO Auto-generated method stub

	}

}